Change uuid string format to match that outputted by Xen.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 28 Nov 2005 16:48:25 +0000 (16:48 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 28 Nov 2005 16:48:25 +0000 (16:48 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/uuid.py

index 77517e9fbeac2af10ae9662b09714528b884ae9b..c471067fdd9c181cb6402dc7c6fe155405816bfb 100644 (file)
@@ -54,8 +54,7 @@ def create():
 
 
 def toString(u):
-    f = "%02x"
-    return ( "-".join([f*4, f*2, f*2, f*2, f*6]) % tuple(u) )
+    return "-".join(["%02x" * 4] * 4) % tuple(u)
 
 def fromString(s):
     s = s.replace('-', '')